package d0320;

import java.io.*;

public class FileCopy {
    public static void main(String[] args) {
        FileOutputStream fis=null;
        FileOutputStream fos=null;
        try{
            fis= new FileOutputStream(new File("D:/HelloWorld.txt"));
            fos=new FileOutputStream(new File("D:/HelloWorld.txt/IOTest"));
            int x=0;
            while (true) {
                fos.write(x);
            }
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }catch (IOException e){
            e.printStackTrace();
        }finally {
            if (null !=fis){
                try {
                    fis.close();
                }catch (IOException e){
                    e.printStackTrace();
                }
            }
        }
    }
}



